provider Explore GET
/api/0/organizations/{organization_id_or_slug}/events-timeseries/ @utdk/sentry
/api/0/organizations/{organization_id_or_slug}/events-timeseries/ Query Explore Events in Timeseries Format
Retrieves explore data for a given organization as a timeseries.
This endpoint can return timeseries for either 1 or many axis, and results grouped to the top events depending
on the parameters passed
- organization_id_or_slug path required
- The ID or slug of the organization the resource belongs to.
- string
- dataset query required
- Which dataset to query. The chosen dataset determines which fields are queryable. - `errors` - Error events. - `logs` - Structured log events. - `profile_functions` - Function-level Profiling data. - `spans` - Distributed tracing span events. - `tracemetrics` - Application Metrics. - `uptime_results` - Uptime monitoring check results.
- enum: errors, logs, profile_functions, spans…
- end query
- The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.
- string
- environment query
- The name of environments to filter by.
- array
- project query
- The IDs of projects to filter by. `-1` means all available projects. For example, the following are valid parameters: - `/?project=1234&project=56789` - `/?project=-1`
- array
- start query
- The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.
- string
- statsPeriod query
- The period of time for the query, will override the start & end parameters, a number followed by one of: - `d` for days - `h` for hours - `m` for minutes - `s` for seconds - `w` for weeks For example, `24h`, to mean query data starting from 24 hours ago to now.
- string
- topEvents query
- The number of top event results to return, must be between 1 and 10. When TopEvents is passed, both sort and groupBy are required parameters
- integer
- comparisonDelta query
- The delta in seconds to return additional offset timeseries by
- integer
- interval query
- The size of the bucket for the timeseries to have, must be a value smaller than the window being queried. If the interval is invalid a default interval will be selected instead
- integer
- sort query
- What to order the results of the query by. Must be something in the `field` list, excluding equations.
- string
- groupBy query
- List of fields to group by, *Required* for topEvents queries as this and sort determine what the top events are
- array
- yAxis query
- The aggregate field to create the timeseries for, defaults to `count()` when not included
- string
- query query
- Filters results by using [query syntax](/product/sentry-basics/search/). Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)`
- string
- disableAggregateExtrapolation query
- Whether to disable the use of extrapolation and return the sampled values, due to sampling the number returned may be less than the actual values sent to Sentry
- enum: 0, 1
- preventMetricAggregates query
- Whether to throw an error when aggregates are passed in the query or groupBy
- enum: 0, 1
- excludeOther query
- Only applicable with TopEvents, whether to include the 'other' timeseries which represents all the events that aren't in the top groups.
- enum: 0, 1
Try it
Authentication
Configure credentials for API Reference
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import sentry from '@utdk/sentry';
await sentry.queryExploreEventsInTimeseriesFormat()